package day0616;

public class Test7 {
    public static void main(String[] args) {
        double salary=5000;
        double tax=salary-2000;
        if(20000<=tax && tax<40000){
            System.out.println((tax-20000)*0.25  + 15000*0.2 + 3000*0.15+1500*0.1+500*0.05);
        }else if(5000<=tax && tax<20000){
            System.out.println((tax-5000)*0.2 + 3000*0.15+1500*0.1+500*0.05);
        }else if(2000<=tax && tax<50000){
            System.out.println( (tax-2000)*0.15+1500*0.1+500*0.05);
        }else{

        }
    }
}